<%@page import="sdfi.lee.DAO.PersonDAO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="<a href='<c:url value='/person/personlist.jsp?pg=1&ptype=${param.ptype}' />' >
	<c:choose>
				<c:when test="${param.ptype==1}">领军人物</c:when>
				<c:otherwise>泰山学者</c:otherwise>
			</c:choose>
</a>" name="location">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/index.css" />
<link rel="stylesheet" href="../css/level.css" />
<script type="text/javascript" src="../js/jquery-1.6.js" ></script>
<script type="text/javascript" src="../js/index.js"></script>
<title></title>
</head>
<body>
	<%
		/*
		领军人物  1
		骨干企业	2
		*/
		
		String ptype=request.getParameter("ptype");
		String pg=request.getParameter("pg");
		List<sdfi.lee.Entity.Person> list=new PersonDAO().getAllPerson(Integer.valueOf(pg),20,Integer.valueOf(ptype));
		request.setAttribute("list",list);
	%>
	<c:forEach items="${requestScope.list}" var="person" varStatus="status">
				<c:url value="/person/persondetail.jsp" var="pdetail">
					<c:param name="pid" value="${person.id}"></c:param>
					<c:param name="ptype" value="${param.ptype}"></c:param>
					<c:param name="pg" value="${param.pg}"></c:param>
				</c:url>
			<div class="personitem">
			
				<div><a href="${pdetail}" target="_blank"><img src="<c:url value='${person.personPath}' />"/></a>
				</div>
				<div><a href="${pdetail}" target="_blank">${person.personname}</a></div>
			</div>
			</c:forEach>
			<div style="clear:both"></div>
			  <div id="pages">
                	
                每页<span>20</span>条,第<span>${param.pg}</span>页,该页
                	<span>${fn:length(requestScope.list) }</span>条
                    <c:choose>
                		<c:when test='${param.pg==null||param.pg==""||param.pg==1}'>
                			上页
                		</c:when>
                		<c:otherwise>
                			<c:url value='/person/personlist.jsp?ptype=${param.type}&pg=${param.pg-1}'  var="down"/>
                			 <a href="${down}">上页</a>
                		</c:otherwise>
                	</c:choose>
                	
                   	<c:choose>
                   		<c:when test="${fn:length(requestScope.list)<20}">
                   			下页
                   		</c:when>
                   		<c:otherwise>
                   		<a href="<c:url value='/person/personlist.jsp?ptype=${param.type}&pg=${param.pg+1}' />">下页</a>
                   		</c:otherwise>
                   	</c:choose>
                    
                </div>
	
</body>
</html>